﻿using Peter.Common.Interfaces;

namespace Peter.Sdw.Logic
{
   /// <summary>
   /// Model for adding a list.
   /// </summary>
   public class AddListModel
   {
      /// <summary>
      /// Initializes a new add list model.
      /// </summary>
      public AddListModel ()
      {
         this.Add = new EditorAddModel ();
         this.Range = new EditorRangeModel ();
         this.Message = new EditorMessageModel();
      }

      /// <summary>
      /// Gets or Sets the editor.
      /// </summary>
      public IPeterEditor Editor
      {
         get { return this.Add.Editor; }
         set
         {
            this.Add.Editor = value;
            this.Range.Editor = value;
         }
      }

      /// <summary>
      /// Gets the add model.
      /// </summary>
      public EditorAddModel Add { get; private set; }

      /// <summary>
      /// Gets the range model.
      /// </summary>
      public EditorRangeModel Range { get; private set; }

      /// <summary>
      /// Gets the message model.
      /// </summary>
      public EditorMessageModel Message { get; private set; }
   }
}
